A piston position detecting device like this has been hitherto well known as described in, for example, Patent Document, Japanese Unexamined Patent Application Publication No. 08-110202. The art described in the Patent Document is such that a sensor supporting piece member is fixed on the outer surface of a cylinder tube using a band, and a position sensor is attached to the sensor supporting piece member using a fixing screw; an operating position of the piston is detected by sensing magnetism of a magnet mounted to the piston by means of the position sensor.
However, since the conventional piston position detecting device is provided with a position sensor attached in a state of being exposed to the outside, in the case, for example, that a fluid pressure cylinder is used for an automatic welding machine for welding an automobile vehicle body or the like, such a problem tends to arise that the position sensor is contaminated by a spatter spattered during welding work, or it becomes difficult to remove the position sensor or to adjust the position thereof because a groove or a hole, which is provided for setting a tool on the head of a fixing screw, is clogged with a spatter to make turning of the fixing screw difficult. In addition, it also happens that other equipment comes into contact with the position sensor to damage it.
Although the above problem is resolved if the position sensor is covered with a cover, it is required to provide a mechanism for installing the cover in addition to a mechanism for attaching the position sensor and the construction of the position detecting device therefore becomes complicated. Moreover, since the cover is obstructive when attaching and detaching of the position sensor, adjusting of the position thereof, or the like is implemented, it is necessary to remove the cover before such a job is executed and, on top of that, the job of attaching and detaching of the cover and the job of attaching and detaching of the position sensor should be done separately; these jobs are very troublesome, and take time and effort.